# 设置最低版本要求
cmake_minimum_required(VERSION 3.10)

# 定义项目名称
project(chat)

# 设置 C++ 标准为 C++11
set(CMAKE_CXX_STANDARD 11)

# 设置 C++ 编译选项
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g")

# 配置最终可执行文件的搜索路径
set(EXECUTABLE_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/bin)

# 配置头文件的搜索路径
include_directories(${PROJECT_SOURCE_DIR}/include)
include_directories(${PROJECT_SOURCE_DIR}/thirdparty)
include_directories(${PROJECT_SOURCE_DIR}/include/server)
include_directories(${PROJECT_SOURCE_DIR}/include/server/db)
include_directories(${PROJECT_SOURCE_DIR}/include/server/model)
include_directories(${PROJECT_SOURCE_DIR}/include/server/redis)
include_directories(/usr/include/mysql)
include_directories(/usr/local/include/hiredis)

# 加载子目录
add_subdirectory(src)